package ar.org.sstuyv

import geb.spock.GebSpec


class LoginSpec extends GebSpec  {

	def "loguear usuario trucho"() {
			
		given:
		to LoginPage		
		
		expect:
		at LoginPage
		
		when:
		loginForm.with  {
			campoUser = "pepe"
			campoPassword = "grillo"
		}
		submit
			
		then:
		at(LoginPage)

	}
	
	def "loguear administrador"() {
		
		given:
		to LoginPage				
		
		when:
		loginForm.with  {
			campoUser = "admin"
			campoPassword = "admin"
		}
		submit
			
		then:
		at(AdministradorListPage)

	}
	

	def "loguear perfil sociales"() {
		
		given:
		to LoginPage
		
		when:
		loginForm.with  {
			campoUser = "adibernardi"
			campoPassword = "adibernardi2k13"
		}
		submit
			
		then:
		//assert at(CensoListPage)
		at(CensoListPage)

	}
	
	def "loguear perfil legal"() {
		
		given:
		to LoginPage
		
		when:
		loginForm.with  {
			campoUser = "atrovero"
			campoPassword = "atrovero2k13"
		}
		submit
			
		then:
		at(SolicitudListPage)

	}
	
	
	def "loguear perfil tecnico"() {
		
		given:
		to LoginPage
		
		when:
		loginForm.with  {
			campoUser = "gsorgini"
			campoPassword = "gsorgini2k13"
		}
		submit
			
		then:
		at(SolicitudListPage)
		
	}
	
	
}
